package com;

import com.fz.dao.BookDAO;
import com.fz.entity.Book;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by webrx on 2017-09-12.
 */
public class Demo {
    @Test
    public void tt(){
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookDAO bdao = ctx.getBean(BookDAO.class);
        Book book = bdao.queryById(6);
        System.out.println(book);
        ctx.close();
    }
}
